﻿using JGSY.SmartIndustry.Dashboard.Core;

namespace JGSY.SmartIndustry.Dashboard.Models
{
    public class LightModel : NotifyBase
    {
        private string _lightColor = "#888";

        public string LightColor
        {
            get { return _lightColor; }
            set { SetProperty<string>(ref _lightColor, value); }
        }

        private bool _state;

        public bool State
        {
            get { return _state; }
            set
            {
                SetProperty<bool>(ref _state, value);
                LightColor = value ? "#F90" : "#888";
            }
        }

        public ushort Address { get; set; }
    }
}
